package com.expense.common.entity.params;

public class BasePageSortParam {

    private Integer page = 1;
    private Integer pageSize = 10;
    //排序字段
    private String sort;
    //排序方式，正序或者倒序
    private String order;

    public PaginationParam getPage(){
        PaginationParam param = new PaginationParam();
        param.setPage(page);
        param.setPageSize(pageSize);
        return param;
    }

    public SortParam getSort(){
        SortParam param = new SortParam();
        param.setSort(sort);
        param.setOrder(order);
        return param;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public void setOrder(String order) {
        this.order = order;
    }
}
